<?php
	
	$plugins -> page -> setPageModificationType( $params[0] );
	$pagedata = $plugins -> page -> getPageById( $params[1] );
	$pagename = ucfirst($pagedata->name);
	
	/**
	 * Load doctype
	 */
	$plugins -> html -> doctype ( "XHTML 1.0 Strict" );
	
?>

<head>

<?php

	/**
	 * Lets load standard meta tags...
	 * ( title, content-type, author, organization, keywords, description )
	 */
	$plugins -> head -> standardMeta();
	
	/**
	 * Deny access for robots!!!! 
	 */
	$plugins -> robots -> deny();

	/**
	 * Load css template!
	 */
	$plugins -> css -> load(
		array (
			"style"     => "screen",
			"styleIE"   => "screen",
			"styleIE7"  => "screen"
		)
	);
	?>
	<script type="text/javascript">
		var page = "<?php echo $params[0]; ?>";
		var id   = "<?php echo $params[1]; ?>";
	</script>
	<?php
	/**
	 * Lets go load javascript files...
	 */
	$plugins -> js -> load( array (
		"jquery-1.2.6" => false,
		//"jquery/hotkeys"    => false,
		"jquery-ui"         => false,
		"workspaceat/menu"  => false,
		//"workspaceat/hotkeys"  => false,
		"workspaceat/fastlaunch" => false,
		//"workspaceat/alerts"     => false,
		//"workspaceat/notice_window" => false,
		"workspaceat/modifypage"    => false,
	));
	
?>
</head>
<!-- Listen to me very carefully... Listen! I don't hear you! A?!?!?
     For 6.123.145 time DONT START WITH BUGS! I PLEASE U DON'T and IE... 
	 Go burn urself or should we let render to do it for u?! He kinda likes that a lot. -->
<body>

	<!-- PROGRESS AREA -->
	<div class="progress" id="progress">
		<p id="pmessage">Please wait...</p>
	</div>

	<!-- STARTUP NOTICE AREA-->
	<div class="notice" id="notice">
		
		<div class="box">
			<div class="header">
				<h2>Welcome to Workspace@ page creation wizzard!</h2>
				
				<img class="x" id="close" src="<?php echo $plugins -> css -> getCssPath(); ?>/elements/exit_btn_notice.png" alt="Close window" />
			</div>
			
			<div class="container">
				<p>Please spend on us few moments!</p>
				
				<p>Page creator we can call wizzarding as well. This is semi or fully automated system which will
				   lead you untill page creation is finished. You can stop it at any time by clicking on discard or save.
				   Page will not be published untill you say PUBLISH ME or whatsoever lol :).  </p>
				   
				   <p>How we said, page will not be published but it accessable from browser! Only thing is that it will
				   not be linked on any way untill u click on publish. We hope that you'll enjoy in building web pages.
				   If not, sue me! :) lol ( just kidding.. )</p>
					
				
				<a href="#" class="likebutton" id="notice_ok"  title="">Sure, thanks!</a>
				<a href="#" class="likebutton" id="notice_not" title="">I'm disabled :D</a>
			</div>
			
			<div class="footer">&nbsp;</div>
		</div>
		
	</div>
	
	<!-- FAST LAUNCHER AREA -->
	<div class="fastlaunch" id="fastlaunch">
		
		<div class="topfix">
			<img class="x" id="launch_close" src="<?php echo $plugins -> css -> getCssPath(); ?>/elements/launch_x.png" alt="Close window" />
		</div>
		
		<div class="container">
			<h1>Workspace@ quick access</h1>
			
			<p>This area is used for quick access inside of Workspace@ features. Just start to write
			   down and system will find and save your searchs :)</p>
			   
			<input type="text" id="fastlaunch_browser" name="fastlaunch_browser" value="Start to typing..." />
		</div>
		
		<div class="bottomfix">&nbsp;</div>
	</div>
	
	<div class="fastlaunch_activator">
		
		<ul>
			<li>
			<img class="x" id="launch_btn" src="<?php echo $plugins -> css -> getCssPath(); ?>/elements/quicklaunch_btn.png" alt="Close window" />
			</li>
		</ul>
	</div>
	
	<!-- FLOATING QUICK NAVI AREA -->
	<div class="quicknavi" id="quicknavi">
		
		<div class="handler" id="quicknavi_handler">
			<div class="fukyou">
				<img class="quick_handler" id="launch_btn" src="<?php echo $plugins -> css -> getCssPath(); ?>/elements/quickmenu_title_bg.png" 
				alt="Open/Close quick navigation" />
			</div>
		</div>
		
		<div class="container" id="quicknavi_container">
			<h2>Workspace@ Engine standard shortcuts</h2>
			
			<ul>
			
				<li id="homepage_link">
					<h2>Home page</h2>
					<p><a href="<?php echo $plugins -> page -> link ( "" ); ?>" title="<?php echo $plugins -> language -> startlinktitle; ?>" >Go to Workspace@ Engine home page!</a></p>
				</li>
				
				<li id="quickl_handler">
					<h2>Quick launcher</h2>
					<p>Quick launcher will help you to easily access W@E features!</p>
				</li>
				
				<li>
					<h2>Notes</h2>
					<p id="notes_handler">Do we need to write any description for this?</p>
				</li>
			</ul>
			
			<div class="fukyou2">
				<p>There are no deadlines or alerts to show! That's good :D</p>
				
				<p>If you like to, you can define one :) LoL</p>
			</div>
		</div>
		
	</div>

	<?php
		$repository->menu->loadComponent( "main", "backend" );
	?>
	
	<!-- USER AREA -->
	<div class="userarea">
		
		<!-- Container exists because of bg fix. Don't remove it! -->
		<div class="container">
		
			<h1>quick user area</h1>
			
			<p>Welcome to quick user area. Click on links below to modify your user account</p>
			
			<ul>
				<li>
					<a href="<?php echo $plugins -> page -> link ( "" ); ?>" 
					title="<?php echo $plugins -> language -> startlinktitle; ?>" >Account info</a>
				</li>
				<li>
					<a href="<?php echo $plugins -> page -> link ( "" ); ?>" 
					title="<?php echo $plugins -> language -> startlinktitle; ?>" >Manage profile</a>
				</li>
				<li>
					<a href="<?php echo $plugins -> page -> link ( "" ); ?>" 
					title="<?php echo $plugins -> language -> startlinktitle; ?>" >Team area</a>
				</li>
				<li>
					<a href="<?php echo $plugins -> page -> link ( "" ); ?>" 
					title="<?php echo $plugins -> language -> startlinktitle; ?>" >Private messages (0)</a>
				</li>
				<li>
					<a href="<?php echo $plugins -> page -> link ( "authenticate/logout" ); ?>" 
					title="<?php echo $plugins -> language -> logout; ?>" ><?php echo $plugins -> language -> logout; ?></a>
				</li>
			</ul>
		</div>
		
	</div>
	
	<!-- Top fixer and alert container a.k.a area -->
	<div class="topfix">
		<div class="alert" id="basealert">
			<h1 id="balerttitle">Workspace@ activation error</h1>
			<p  id="balertmessage">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam vel elit. 
			   Sed lobortis blandit lorem. Mauris dictum dolor nec eros. Integer vitae massa id odio rutrum pretium. 
			   Donec ligula leo, tristique et, tempor molestie, accumsan eget, odio. Nullam odio arcu, rutrum vitae, 
			   lobortis in, pharetra quis, nunc.</p>
			
		</div>
	</div>
	
	<!-- PAGE WARPER -->
	<div class="warp" id="warp_manage_page">
		
		<div class="preloading_page" id="preloading" >
			
			<div>
				<p id="pre_mess">Please wait... system is preparing data for permissions</p> 
				<img src="<?php echo $plugins -> css -> getCssPath(); ?>/elements/ajax-loader.gif" alt="#" />
			</div>
			
		</div>
		
		<!-- CONTAINER AREA-->
		<div class="container" id="managepage">

			
			<div class="tabhandler">
				<ul>
					<li class="current" id="t_one"><a href="<?php echo $plugins -> page -> link ( "pages/manage/:{$params[0]}/:{$params[1]}/" ); ?>" title="">General questions</a>
					<li class="blue" id="t_three"><a href="<?php echo $plugins -> page -> link ( "pages/manage/components/:{$params[0]}/:{$params[1]}/" ); ?>" title="">Page components</a>
					<li class="red" id="t_four"><a href="<?php echo $plugins -> page -> link ( "pages/manage/features/:{$params[0]}/:{$params[1]}/" ); ?>" title="">Page features</a>
					<li class="blue" id="t_six"><a href="<?php echo $plugins -> page -> link ( "pages/manage/seo/:{$params[0]}/:{$params[1]}/" ); ?>" title="">SEO questions</a>
					<li class="red" id="t_six"><a href="<?php echo $plugins -> page -> link ( "pages/manage/robots:{$params[0]}/:{$params[1]}/" ); ?>" title="">Robots</a>
					<li class="blue" id="t_six"><a href="<?php echo $plugins -> page -> link ( "pages/manage/html:{$params[0]}/:{$params[1]}/" ); ?>" title="">Modify html</a>
					<li class="red" id="t_six"><a href="<?php echo $plugins -> page -> link ( "pages/manage/css/:{$params[0]}/:{$params[1]}/" ); ?>" title="">Modify css</a>
					<li class="blue" id="t_six"><a href="<?php echo $plugins -> page -> link ( "pages/manage/positions/:{$params[0]}/:{$params[1]}/" ); ?>" title="">Modify positions</a>
				</ul>
			</div>
		
			<div class="tabs" id="tabs">
				
				<div class="box">
					<h1>General questions about current page ( <?php echo $pagename; ?> page )</h1>
					<hr />
					<p  class="validmessage" id="validmessage">General questions are builted with reason to give us base information about current page. 
					Please don't rush, spend time on reading
					   <a href="#" title="#">manual</a> and I'm sure that you will not mistake. 
					   Building page isn't hard. It's quite easy but still you can make mistake what will result
					   that page acts differently that you expect!</p>
				</div>
				
				<form action="#" name="managepage_form" id="managepage_form" enctype="multipart-form-data">
				<ul>
					<li>
						<h3>Page name</h3>
						<p>It can't have spaces or special characters. Best not to touch at all! </p>
						<input type="text" id="name" value="<?php echo $pagename; ?>">
					</li>
					<li>
						<h3>Page description for admins</h3>
						<p>Type description which will be visible to admins. Input is small because description must be small as well :)</p>
						<input type="text" id="name" value="<?php echo $pagedata->description; ?>">
					</li>
					<li>
						<h3>Page author</h3>
						<p>You can choose from your existing nicknames that one of them be author of this page!</p>
						<select name="pageowner" id="pageowner">
							<option value="index-follow">Allow access and indexing</option>
							<option value="noindex-nofollow">Disallow access</option>
						</select>
					</li>
					<li>
						<h3>Track statistic</h3>
						<p>You can set that system tracks vistors for this page or not. It's up to you!</p>
						<select name="pageowner" id="pageowner">
							<option value="true">Track</option>
							<option value="false">Don't track</option>
						</select>
					</li>
				</ul>
				</form>
				
			</div>

			<div class="tabhandler" id="controls">
				<ul>
					<li class="blue" id="publish"><a href="#" title="">Publish</a>
					<li class="red" id="save"><a href="#" title="">Save</a>
					<li class="red" id="discard"><a href="#" title="">Discard</a>
				</ul>
			</div>
				
		</div>
	</div>
	
	
	<!-- Bottom fix area -->
	<div class="bottomfix">
	
		<div class="footer">
			<p>Copyright 2008-2009 <a href="http://workspaceat.com" title="#">Workspace@</a> in association with 
			   <a href="http://designstrategist.hr" title="#">Design strategist</a></p>
		</div>
		
	</div>
	
</body>
</html>